package com.zrrd.learn.chapter09;

import java.io.File;
import java.util.Objects;

/**
 * @author wrn
 * @version 1.0
 * @date 2023/8/21 14:00
 */

public class Wholelo {

    public static void printFileName(File target){
        if (target.isFile()){
            System.out.println(target.getName()+"-->文件名称");
        } else {
            File[] fs = target.listFiles();
            if (Objects.nonNull(fs)) {
                for (File f : fs){
                    printFileName(f);
                }
            }
        }
    }


    public static void main(String[] args) {
//        printFileName(new File());
    }
}
